package es.armaplus.dao;

import org.hibernate.Session;

import es.armaplus.hibernate.HibernateUtils;


public class BaseDAO {

	public void guardar(Object obj) {
		Session session = HibernateUtils.getSessionFactory().getCurrentSession();
		session.saveOrUpdate(obj);
		session.flush();
	}

	public void borrar(Object obj) {
		Session session = HibernateUtils.getSessionFactory().getCurrentSession();
		session.delete(obj);
		session.flush();
	}

	
}
